<% if @priorities.any? %>

	<% if ['finished','yours_finished'].include?(params[:action]) %>
		<ul>
	<% elsif ['yours'].include?(params[:action])%>
		<ol start=<%= @priorities[0].position %>>
	<% else %>
		<ol>
	<% end %>
	<% for e in @priorities %>
		<% if [Endorsement,BranchEndorsement].include?(e.class) %>
			<% priority = e.priority %>
		<% else %>
			<% priority = e %>
		<% end %>
		<% if ['yours','network'].include?(params[:action]) %>
			<li>
		<% else %>
			<li value="<%= priority.position %>">
		<% end %>
		<span class="nb_priority_name">
				<%= link_to h(priority.name), priority_url(priority, :only_path => false), :class => "nb_priority_name_link", :id => "nb_priority_name_link_#{priority.id.to_s}" %>

			</span>
			<% if priority.status == 'inactive' %>
				<span class="nb_priority_finished_status"><%= official_status(priority) %></span>
			<% end %>			
			<% if not priority.status == 'inactive' %>
				<br/>
				<span class="nb_priority_position_status">
					<% if priority.position != 0 and params[:action] == 'yours' %>
						<%= t('priorities.position.number', :position => priority.position)%>,
					<% end %>
					<% if priority.is_new? %>	
						<%= t('priorities.position.new.7days.short') %>
					<% elsif priority.position_7days_change > 0 %>
						<%= t('priorities.position.up.7days.short', :count => priority.position_7days_change.abs)%>
					<% elsif priority.position_7days_change < 0 %>
						<%= t('priorities.position.down.7days.short', :count => priority.position_7days_change.abs)%>
					<% else %>
						<%= t('priorities.position.no_change.7days.short') %>
					<% end %>
				</span>
			<% end %>
		</li>
	<% end %>
	<% if ['yours','finished','yours_finished'].include?(params[:action]) %>
		</ul>
	<% else %>
		</ol>
	<% end %>
	
<% else %>
	
	No priorities yet.

<% end %>